f1='pro_pat.dbf'
f2='in_pat.dbf'
IF FILE("&DR1&F1")
   use &dr1&f1
   if fil_lock(0)
      copy to &dr2&f1
   endif
   unlock
ENDIF
IF FILE("&DR1&F2")
   use &dr1&f2
   if fil_lock(0)
      copy to &dr2&f2
   endif
   unlock
ENDIF

clos data
f1='drugs.dbf'
f2='dispos.dbf'
f3='company.dbf'
f4='supplier.dbf'
f5='doctors.dbf'
f6='medic_pr.dbf'
IF FILE("&DR1&F1")
   use &dr1&f1
   if fil_lock(0)
      copy to &dr2&f1
   endif
   unlock
ENDIF
IF FILE("&DR1&F2")
   use &dr1&f2
   if fil_lock(0)
      copy to &dr2&f2
   endif
   unlock
ENDIF
IF FILE("&DR1&F3")
   use &dr1&f3
   If fil_lock(0)
      copy to &dr2&f3
   endif
   unlock
ENDIF
IF FILE("&DR1&F4")
   use &dr1&f4
   if fil_lock(0)
      copy to &dr2&f4
   endif
   unlock
ENDIF
IF FILE("&DR1&F5")
   use &dr1&f5
   if fil_lock(0)
      copy to &dr2&f5
   endif
   unlock
ENDIF
IF FILE("&DR1&F6")
   use &dr1&f6
   if fil_lock(0)
      copy to &dr2&f6
   endif
   unlock
ENDIF
clos data
f1='activity.dbf'
f2='revenue.dbf'
f3='doct_fee.dbf'
f4='act_proc.dbf'
f5='act_phar.dbf'
IF FILE("&DR1&F1")
   use &dr1&f1
   if fil_lock(0)
      copy to &dr2&f1
   endif
   unlock
ENDIF
IF FILE("&DR1&F2")
   use &dr1&f2
   if fil_lock(0)
      copy to &dr2&f2
   endif
   unlock
ENDIF
IF FILE("&DR1&F3")
   use &dr1&f3
   If fil_lock(0)
      copy to &dr2&f3
   endif
   unlock
ENDIF
IF FILE("&DR1&F4")
   use &dr1&f4
   if fil_lock(0)
      copy to &dr2&f4
   endif
   unlock
ENDIF
IF FILE("&DR1&F5")
   use &dr1&f5
   if fil_lock(0)
      copy to &dr2&f5
   endif
   unlock
ENDIF
clos data
f1='activit1.dbf'
f2='revenue1.dbf'
f3='doct_fe1.dbf'
f4='act_pro1.dbf'
f5='act_pha1.dbf'
IF FILE("&DR1&F1")
   use &dr1&f1
   if fil_lock(0)
      copy to &dr2&f1
   endif
   unlock
ENDIF
IF FILE("&DR1&F2")
   use &dr1&f2
   if fil_lock(0)
      copy to &dr2&f2
   endif
   unlock
ENDIF
IF FILE("&DR1&F3")
   use &dr1&f3
   If fil_lock(0)
      copy to &dr2&f3
   endif
   unlock
ENDIF
IF FILE("&DR1&F4")
   use &dr1&f4
   if fil_lock(0)
      copy to &dr2&f4
   endif
   unlock
ENDIF
IF FILE("&DR1&F5")
   use &dr1&f5
   if fil_lock(0)
      copy to &dr2&f5
   endif
   unlock
ENDIF
clos data
f1='dlv_phar.dbf'
f2='trn_drug.dbf'
f3='trn_disp.dbf'
f4='ord_drug.dbf'
f5='ord_disp.dbf'
IF FILE("&DR1&F1")
   use &dr1&f1
   if fil_lock(0)
      copy to &dr2&f1
   endif
   unlock
ENDIF
IF FILE("&DR1&F2")
   use &dr1&f2
   if fil_lock(0)
      copy to &dr2&f2
   endif
   unlock
ENDIF
IF FILE("&DR1&F3")
   use &dr1&f3
   If fil_lock(0)
      copy to &dr2&f3
   endif
   unlock
ENDIF
IF FILE("&DR1&F4")
   use &dr1&f4
   if fil_lock(0)
      copy to &dr2&f4
   endif
   unlock
ENDIF
IF FILE("&DR1&F5")
   use &dr1&f5
   if fil_lock(0)
      copy to &dr2&f5
   endif
   unlock
ENDIF
clos data
f1='int_drug.dbf'
f2='int_disp.dbf'
f3='drug_ent.dbf'
f4='disp_ent.dbf'
f5='cli_drug.dbf'
f6='cli_disp.dbf'
IF FILE("&DR1&F1")
   use &dr1&f1
   if fil_lock(0)
      copy to &dr2&f1
   endif
   unlock
ENDIF
IF FILE("&DR1&F2")
   use &dr1&f2
   if fil_lock(0)
      copy to &dr2&f2
   endif
   unlock
ENDIF
IF FILE("&DR1&F3")
   use &dr1&f3
   If fil_lock(0)
      copy to &dr2&f3
   endif
   unlock
ENDIF
IF FILE("&DR1&F4")
   use &dr1&f4
   if fil_lock(0)
      copy to &dr2&f4
   endif
   unlock
ENDIF
IF FILE("&DR1&F5")
   use &dr1&f5
   if fil_lock(0)
      copy to &dr2&f5
   endif
   unlock
ENDIF
IF FILE("&DR1&F6")
   use &dr1&f6
   if fil_lock(0)
      copy to &dr2&f6
   endif
   unlock
ENDIF
clos data
f1='pur_disp.dbf'
f2='pur_drug.dbf'
f3='pur_spec.dbf'
IF FILE("&DR1&F1")
   use &dr1&f1
   if fil_lock(0)
      copy to &dr2&f1
   endif
   unlock
ENDIF
IF FILE("&DR1&F2")
   use &dr1&f2
   if fil_lock(0)
      copy to &dr2&f2
   endif
   unlock
ENDIF
IF FILE("&DR1&F3")
   use &dr1&f3
   If fil_lock(0)
      copy to &dr2&f3
   endif
   unlock
ENDIF
clos data
f1='employee.dbf'
f2='family.dbf'
f3='appavail.dbf'
f4='appoint.dbf'
IF FILE("&DR1&F1")
   use &dr1&f1
   if fil_lock(0)
      copy to &dr2&f1
   endif
   unlock
ENDIF
IF FILE("&DR1&F2")
   use &dr1&f2
   if fil_lock(0)
      copy to &dr2&f2
   endif
   unlock
ENDIF
IF FILE("&DR1&F3")
   use &dr1&f3
   if fil_lock(0)
      copy to &dr2&f3
   endif
   unlock
ENDIF
IF FILE("&DR1&F4")
   use &dr1&f4
   if fil_lock(0)
      copy to &dr2&f4
   endif
   unlock
ENDIF
clos data
F1='PHYPAT.DBF'
F2='PHYCLASS.DBF'
F3='PHYDEF.DBF'
F4='PHYCOURS.DBF'
F5='PHYOPEN.DBF'
IF FILE("&DR1&F1")
   use &dr1&f1
   if fil_lock(0)
      copy to &dr2&f1
   endif
   unlock
ENDIF
IF FILE("&DR1&F2")
   use &dr1&f2
   if fil_lock(0)
      copy to &dr2&f2
   endif
   unlock
ENDIF
IF FILE("&DR1&F3")
   use &dr1&f3
   if fil_lock(0)
      copy to &dr2&f3
   endif
   unlock
ENDIF
IF FILE("&DR1&F4")
   use &dr1&f4
   if fil_lock(0)
      copy to &dr2&f4
   endif
   unlock
ENDIF
IF FILE("&DR1&F5")
   use &dr1&f5
   if fil_lock(0)
      copy to &dr2&f5
   endif
   unlock
ENDIF
clos data
F1='CLI_PRIN.DBF'
F2='CLI_PRNT.DBF'
F3='COMPA.DBF'
F4='DLV_DISP.DBF'
F5='DLV_DRUG.DBF'
IF FILE("&DR1&F1")
   use &dr1&f1
   if fil_lock(0)
      copy to &dr2&f1
   endif
   unlock
ENDIF
IF FILE("&DR1&F2")
   use &dr1&f2
   if fil_lock(0)
      copy to &dr2&f2
   endif
   unlock
ENDIF
IF FILE("&DR1&F3")
   use &dr1&f3
   if fil_lock(0)
      copy to &dr2&f3
   endif
   unlock
ENDIF
IF FILE("&DR1&F4")
   use &dr1&f4
   if fil_lock(0)
      copy to &dr2&f4
   endif
   unlock
ENDIF
IF FILE("&DR1&F5")
   use &dr1&f5
   if fil_lock(0)
      copy to &dr2&f5
   endif
   unlock
ENDIF
clos data
F1='DLV_TEMP.DBF'
F2='DOCSPEC.DBF'
F3='EMPREG.DBF'
F4='ERRFIX.DBF'
F5='HL_FEE.DBF'
IF FILE("&DR1&F1")
   use &dr1&f1
   if fil_lock(0)
      copy to &dr2&f1
   endif
   unlock
ENDIF
IF FILE("&DR1&F2")
   use &dr1&f2
   if fil_lock(0)
      copy to &dr2&f2
   endif
   unlock
ENDIF
IF FILE("&DR1&F3")
   use &dr1&f3
   if fil_lock(0)
      copy to &dr2&f3
   endif
   unlock
ENDIF
IF FILE("&DR1&F4")
   use &dr1&f4
   if fil_lock(0)
      copy to &dr2&f4
   endif
   unlock
ENDIF
IF FILE("&DR1&F5")
   use &dr1&f5
   if fil_lock(0)
      copy to &dr2&f5
   endif
   unlock
ENDIF

clos data
F1='INT_PRIN.DBF'
F2='LABORAT.DBF'
F3='LAB_STOR.DBF'
F4='LAB_TEST.DBF'
F5='MAIN_ARE.DBF'
IF FILE("&DR1&F1")
   use &dr1&f1
   if fil_lock(0)
      copy to &dr2&f1
   endif
   unlock
ENDIF
IF FILE("&DR1&F2")
   use &dr1&f2
   if fil_lock(0)
      copy to &dr2&f2
   endif
   unlock
ENDIF
IF FILE("&DR1&F3")
   use &dr1&f3
   if fil_lock(0)
      copy to &dr2&f3
   endif
   unlock
ENDIF
IF FILE("&DR1&F4")
   use &dr1&f4
   if fil_lock(0)
      copy to &dr2&f4
   endif
   unlock
ENDIF
IF FILE("&DR1&F5")
   use &dr1&f5
   if fil_lock(0)
      copy to &dr2&f5
   endif
   unlock
ENDIF
clos data
F1='MAIN_PRO.DBF'
F2='MEDICAL.DBF'
F3='MEDITEMP.DBF'
F4='MODIDRUG.DBF'
F5='NEWHEAL.DBF'
IF FILE("&DR1&F1")
   use &dr1&f1
   if fil_lock(0)
      copy to &dr2&f1
   endif
   unlock
ENDIF
IF FILE("&DR1&F2")
   use &dr1&f2
   if fil_lock(0)
      copy to &dr2&f2
   endif
   unlock
ENDIF
IF FILE("&DR1&F3")
   use &dr1&f3
   if fil_lock(0)
      copy to &dr2&f3
   endif
   unlock
ENDIF
IF FILE("&DR1&F4")
   use &dr1&f4
   if fil_lock(0)
      copy to &dr2&f4
   endif
   unlock
ENDIF
IF FILE("&DR1&F5")
   use &dr1&f5
   if fil_lock(0)
      copy to &dr2&f5
   endif
   unlock
ENDIF

clos data
F1='NON_INVP.DBF'
F2='PATHLTEM.DBF'
F3='PHARMACY.DBF'
F4='PHYTEMP.DBF'
F5='PUR_TEMP.DBF'
IF FILE("&DR1&F1")
   use &dr1&f1
   if fil_lock(0)
      copy to &dr2&f1
   endif
   unlock
ENDIF
IF FILE("&DR1&F2")
   use &dr1&f2
   if fil_lock(0)
      copy to &dr2&f2
   endif
   unlock
ENDIF
IF FILE("&DR1&F3")
   use &dr1&f3
   if fil_lock(0)
      copy to &dr2&f3
   endif
   unlock
ENDIF
IF FILE("&DR1&F4")
   use &dr1&f4
   if fil_lock(0)
      copy to &dr2&f4
   endif
   unlock
ENDIF
IF FILE("&DR1&F5")
   use &dr1&f5
   if fil_lock(0)
      copy to &dr2&f5
   endif
   unlock
ENDIF
clos data
F1='SCHEDUL.DBF'
F2='SOSMAIN.DBF'
F3='SUB_AREA.DBF'
F4='SUB_AREC.DBF'
F5='SUB_ARED.DBF'
IF FILE("&DR1&F1")
   use &dr1&f1
   if fil_lock(0)
      copy to &dr2&f1
   endif
   unlock
ENDIF
IF FILE("&DR1&F2")
   use &dr1&f2
   if fil_lock(0)
      copy to &dr2&f2
   endif
   unlock
ENDIF
IF FILE("&DR1&F3")
   use &dr1&f3
   if fil_lock(0)
      copy to &dr2&f3
   endif
   unlock
ENDIF
IF FILE("&DR1&F4")
   use &dr1&f4
   if fil_lock(0)
      copy to &dr2&f4
   endif
   unlock
ENDIF
IF FILE("&DR1&F5")
   use &dr1&f5
   if fil_lock(0)
      copy to &dr2&f5
   endif
   unlock
ENDIF
clos data
F1='SUB_AREE.DBF'
F2='SUB_AREG.DBF'
F3='SUB_AREL.DBF'
F4='SUB_AREO.DBF'
F5='SUB_AREP.DBF'
IF FILE("&DR1&F1")
   use &dr1&f1
   if fil_lock(0)
      copy to &dr2&f1
   endif
   unlock
ENDIF
IF FILE("&DR1&F2")
   use &dr1&f2
   if fil_lock(0)
      copy to &dr2&f2
   endif
   unlock
ENDIF
IF FILE("&DR1&F3")
   use &dr1&f3
   if fil_lock(0)
      copy to &dr2&f3
   endif
   unlock
ENDIF
IF FILE("&DR1&F4")
   use &dr1&f4
   if fil_lock(0)
      copy to &dr2&f4
   endif
   unlock
ENDIF
IF FILE("&DR1&F5")
   use &dr1&f5
   if fil_lock(0)
      copy to &dr2&f5
   endif
   unlock
ENDIF
clos data
F1='SUB_ARES.DBF'
F2='SUB_AREX.DBF'
F3='SUB_AREY.DBF'
F4='SUB_TEMP.DBF'
F5='TRN_PRIN.DBF'
IF FILE("&DR1&F1")
   use &dr1&f1
   if fil_lock(0)
      copy to &dr2&f1
   endif
   unlock
ENDIF
IF FILE("&DR1&F2")
   use &dr1&f2
   if fil_lock(0)
      copy to &dr2&f2
   endif
   unlock
ENDIF
IF FILE("&DR1&F3")
   use &dr1&f3
   if fil_lock(0)
      copy to &dr2&f3
   endif
   unlock
ENDIF
IF FILE("&DR1&F4")
   use &dr1&f4
   if fil_lock(0)
      copy to &dr2&f4
   endif
   unlock
ENDIF
IF FILE("&DR1&F5")
   use &dr1&f5
   if fil_lock(0)
      copy to &dr2&f5
   endif
   unlock
ENDIF
clos data
F1='TEMPCALL.DBF'
F2='TEMPOLAB.DBF'
F3='TEMPOR1.DBF'
F4='TEMPOR2.DBF'
F5='TEMPOR3.DBF'
IF FILE("&DR1&F1")
   use &dr1&f1
   if fil_lock(0)
      copy to &dr2&f1
   endif
   unlock
ENDIF
IF FILE("&DR1&F2")
   use &dr1&f2
   if fil_lock(0)
      copy to &dr2&f2
   endif
   unlock
ENDIF
IF FILE("&DR1&F3")
   use &dr1&f3
   if fil_lock(0)
      copy to &dr2&f3
   endif
   unlock
ENDIF
IF FILE("&DR1&F4")
   use &dr1&f4
   if fil_lock(0)
      copy to &dr2&f4
   endif
   unlock
ENDIF
IF FILE("&DR1&F5")
   use &dr1&f5
   if fil_lock(0)
      copy to &dr2&f5
   endif
   unlock
ENDIF
clos data
F1='TEMPOR5.DBF'
F2='TEMPOR7.DBF'
F3='TEMPOR8.DBF'
F4='TEMPORAR.DBF'
IF FILE("&DR1&F1")
   use &dr1&f1
   if fil_lock(0)
      copy to &dr2&f1
   endif
   unlock
ENDIF
IF FILE("&DR1&F2")
   use &dr1&f2
   if fil_lock(0)
      copy to &dr2&f2
   endif
   unlock
ENDIF
IF FILE("&DR1&F3")
   use &dr1&f3
   if fil_lock(0)
      copy to &dr2&f3
   endif
   unlock
ENDIF
IF FILE("&DR1&F4")
   use &dr1&f4
   if fil_lock(0)
      copy to &dr2&f4
   endif
   unlock
ENDIF


clos data
f1='pati.mem'
f2='vislab.mem'
f3='visit.mem'
f4='report.mem'
f5='monthrev.mem'
f6='monthact.mem'
IF FILE("&DR1&F1")
   Copy file &dr1&f1 to &dr2&f1
ENDIF
IF FILE("&DR1&F2")
   copy file &dr1&f2 to &dr2&f2
ENDIF
IF FILE("&DR1&F3")
   copy file &dr1&f3 to &dr2&f3
ENDIF
IF FILE("&DR1&F4")
   copy file &dr1&f4 to &dr2&f4
ENDIF
IF FILE("&DR1&F5")
   copy file &dr1&f5 to &dr2&f5
ENDIF
IF FILE("&DR1&F6")
   copy file &dr1&f6 to &dr2&f6
ENDIF
CLOS ALL
f1='DELNUM.mem'
f2='PROPAT.mem'
f3='COMPAN.mem'
f4='CLITRA.mem'
f5='INTTRA.mem'
f6='PURORD.mem'
F7='CTRPRN.MEM'
IF FILE("&DR1&F1")
   Copy file &dr1&f1 to &dr2&f1
ENDIF
IF FILE("&DR1&F2")
   copy file &dr1&f2 to &dr2&f2
ENDIF
IF FILE("&DR1&F3")
   copy file &dr1&f3 to &dr2&f3
ENDIF
IF FILE("&DR1&F4")
   copy file &dr1&f4 to &dr2&f4
ENDIF
IF FILE("&DR1&F5")
   copy file &dr1&f5 to &dr2&f5
ENDIF
IF FILE("&DR1&F6")
   copy file &dr1&f6 to &dr2&f6
ENDIF
IF FILE("&DR1&F7")
   copy file &dr1&f7 to &dr2&f7
ENDIF
CLOS ALL
return

